package com.ruoyi.web.service.impl;

import com.ruoyi.framework.web.service.PermissionService;
import com.ruoyi.web.service.IUserPerimService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@Service
public class UserPerimServiceImpl implements IUserPerimService {

    @Autowired
    PermissionService permissionService;

    @Override
    public List<String> getUserInfoSUnVisibleColumnsList(){

        boolean hasPerim = permissionService.isPermitted("member:info:sensitive");
        if (hasPerim){
            return new ArrayList<>();
        }else{
            return Arrays.asList("channelName");
        }
    }

}
